﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeFile="~/Admin/Linhvuc.aspx.cs" CodeBehind="Linhvuc.aspx.cs" Inherits="NCKH.Admin.Linhvuc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div style="margin-left:200px">
        <fieldset style="width: 383px">
            <legend style="text-align:center">QUẢN LÝ LĨNH VỰC</legend>
        <table>
             
            <tr>
                <td>Tên lĩnh vực</td>
                <td>
                      <asp:TextBox ID="txtLV" runat="server" Height="25px" Width="167px"></asp:TextBox>
                </td>
                <td>
                    <asp:RequiredFieldValidator ID="rfvLV" runat="server" ControlToValidate="txtLV" Display="Dynamic" ErrorMessage="Nhập lĩnh vực!"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>&nbsp; &nbsp;&nbsp; &nbsp;</td>
               <td >
                      <asp:ImageButton ID="ibtThem" runat="server" ImageUrl="../Images/Save%20(1).png"  OnClick="ibtThem_Click" CommandName="Thêm" />Lưu lại &nbsp;
            
                    <asp:ImageButton ID="ibtHuy" runat="server" ImageUrl="../Images/xoa.png"  OnClick="ibtHuy_Click" CommandName="Xóa" Height="22px" Width="38px" />Hủy bỏ &nbsp;
                </td>
            </tr>
            <tr>
               <td>&nbsp;&nbsp;&nbsp;Nhập thông tin&nbsp;&nbsp;&nbsp;</td> 
                
                <td>
                    <asp:TextBox ID="txtTimkiem" runat="server" Height="24px" Width="204px"></asp:TextBox>
                </td>
                <td>
                     <asp:ImageButton ID="ibtTimkiem" runat="server" ImageUrl="../Images/search.png"  CausesValidation="false"  OnClick="ibtTimkiem_Click"  />
          
                </td>
            </tr>
            
        </table>
            </fieldset>
        </div>
        <div style="margin-left:250px">
             <br />
            <br />
        <fieldset style="width: 361px">
            <legend style="text-align:center">DANH SÁCH LĨNH VỰC</legend>
        <asp:GridView ID="grvlinhvuc" runat="server" AutoGenerateColumns="false" EnableModelValidation="false"
             onrowcommand="grvLinhvuc_RowCommand" DataKeyNames="MaLV"  AllowPaging="true" PageSize="5" 
            onpageindexchanging="grvlinhvuc_PageIndexChanging">
            <Columns>
                <asp:TemplateField HeaderText="&nbsp;&nbsp;Chọn&nbsp;&nbsp;">
                    <ItemTemplate>
                        <asp:CheckBox ID="chkchon" runat="server" />
                     
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="&nbsp;&nbsp;STT &nbsp;&nbsp;">
                    <ItemTemplate>
                    <%# Container.DataItemIndex + 1 %>
                    </ItemTemplate>
               </asp:TemplateField>
                <asp:BoundField HeaderText="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tên lĩnh vực&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" DataField="TenLV" />
                <asp:TemplateField HeaderText="&nbsp;&nbsp;Xóa&nbsp;&nbsp;">
                    <ItemTemplate>
                        <asp:LinkButton ID="lbtxoa" runat="server" CommandName="xoa" CommandArgument='<%# Eval("MaLV") %>'
                             OnClientClick='return confirm("Có chắc chắn muốn xoá không?");'>
                             <img src="../Images/xoa.png" alt="Xóa" title="Xóa" /></asp:LinkButton>
                       
                    </ItemTemplate>
                    
                </asp:TemplateField>
                <asp:TemplateField HeaderText="&nbsp;&nbsp;Sửa&nbsp;&nbsp;">
                    <ItemTemplate>
                   <a href='Linhvuc_Sua.aspx?pid=<%# Eval("MaLV") %>'>
                        <img src="images/edit.png" alt="Sửa" title="Sửa" /></a>
                    </ItemTemplate>
                     
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
            </fieldset>
             <div style="text-align:left">
            <asp:ImageButton ID="ibtXoa" runat="server" ImageUrl="../Images/delete.png" OnClick="ibtXoa_Click" CommandName="Xóa" CausesValidation="false" Height="31px" Width="25px" />
       </div>
       </div>
</asp:Content>
